package fr.lip6.move.care

import sdmakerz_v1.coresyntax.generator.interfaces.IContext
import sdmakerz_v1.coresyntax.sDMakerV1.Actor

class CareActorGen {
	private CareGen mainGenerator;
	
	new(CareGen mainGenerator){
		this.mainGenerator= mainGenerator;
	}
	
	def public 
	CompileResult compile(IContext context, Actor actor){
		    
    var CharSequence charSequenceResult=
    '''    
                                      
    Actor «actor.name» = new Actor("«actor.name»", actorClass);   
    actors.add(«actor.name»);                                                 
    '''
    
    return new CompileResult(
    				charSequenceResult,
    				actor.name,
    				false)
	}
}